package panda.natalia.gothread.suspend.instrument;

/**
 * a simple framework of java fiber
 *
 * @Author: scpanda2007
 * @Date: 2019/11/29 17:00
 */
public class UnableToInstrumentException extends RuntimeException {

    public String getReason() {
        return reason;
    }

    public String getClassName() {
        return className;
    }

    public String getMethodName() {
        return methodName;
    }

    public String getMethodDesc() {
        return methodDesc;
    }

    private final String reason;
    private final String className;
    private final String methodName;
    private final String methodDesc;

    public UnableToInstrumentException(String reason, String className, String methodName, String methodDesc){
        super(String.format("Unable to instrument %s#%s%s because of %s", className, methodName, methodDesc, reason));
        this.reason = reason;
        this.className = className;
        this.methodName = methodName;
        this.methodDesc = methodDesc;
    }



}
